

<%@ page import="edu.uow.devdocs.Assignment" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'assignment.label', default: 'Assignment')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<div id="list-assignment" class="content scaffold-list" role="main">
			<h1 id="assignment_list"><g:message code="default.list.label" args="[entityName]" /></h1>
			<g:flashMessage/>
			<table class="sortable tableForm">
				<thead>
					<tr>
						<th><g:message code="assignment.issue.label" default="Issue" /></th>
						<th><g:message code="assignment.developmentTask.label" default="Development Task" /></th>
						<th><g:message code="assignment.developmentChecklist.label" default="Development Checklist" /></th>
						<g:sortableColumn property="assignmentComment" title="${message(code: 'assignment.assignmentComment.label', default: 'Assignment Comment')}" />
						<g:sortableColumn property="requiredByDate" title="${message(code: 'assignment.requiredByDate.label', default: 'Required By Date')}" />
						<th><g:message code="assignment.status.label" default="Status" /></th>
						<th><g:message code="assignment.person.label" default="Person" /></th>
						<th><g:message code="assignment.team.label" default="Team" /></th>
						<th></th>
					</tr>
					<tr>
					<form action = "search">
					

	<th> 
	<g:select id="issue" name="issue.id" from="${edu.uow.devdocs.Issue.list([cache: true])}" optionKey="id" value="${params?.issue?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>



	<th> 
	<g:select id="developmentTask" name="developmentTask.id" from="${edu.uow.devdocs.DevelopmentTask.list([cache: true])}" optionKey="id" value="${params?.developmentTask?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>



	<th> 
	<g:select id="developmentChecklist" name="developmentChecklist.id" from="${edu.uow.devdocs.DevelopmentChecklist.list([cache: true])}" optionKey="id" value="${params?.developmentChecklist?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>



	<th> 
	<g:textField name="assignmentComment" value="${params?.assignmentComment}" />
	</th>



	<th> 
	<g:textField name="requiredByDate" value="${params?.requiredByDate}" />
	</th>



	<th> 
	<g:select id="status" name="status.id" from="${edu.uow.devdocs.AssignmentStatus.list([cache: true])}" optionKey="id" value="${params?.status?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>



	<th> 
	<g:select id="person" name="person.id" from="${edu.uow.devdocs.Person.list([cache: true])}" optionKey="id" value="${params?.person?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>



	<th> 
	<g:select id="team" name="team.id" from="${edu.uow.devdocs.Team.list([cache: true])}" optionKey="id" value="${params?.team?.id}" class="many-to-one" noSelection="['null': '']"/>
	</th>


					<th><button type="submit">Go</button></th></form></tr>
				</thead>
				<tbody>
				<g:each in="${assignmentInstanceList}" status="i" var="assignmentInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
						<td><g:link action="edit" id="${assignmentInstance?.issue?.id}">${fieldValue(bean: assignmentInstance, field: "issue")}</g:link></td>
						<td><g:link controller="developmentTask" action="edit" id="${assignmentInstance?.developmentTask?.id}">${fieldValue(bean: assignmentInstance, field: "developmentTask")}</g:link></td>
						<td>${fieldValue(bean: assignmentInstance, field: "developmentChecklist")}</td>
						<td>${fieldValue(bean: assignmentInstance, field: "assignmentComment")}</td>
						<td><g:formatDate date="${assignmentInstance.requiredByDate}" format="dd/MM/yyyy" /></td>
						<td>${fieldValue(bean: assignmentInstance, field: "status")}</td>
						<td>${fieldValue(bean: assignmentInstance, field: "person")}</td>
						<td>${fieldValue(bean: assignmentInstance?.person, field: "team")}</td>
						<td></td>
					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${assignmentInstanceTotal}" />
			</div>
		</div>
	</body>
</html>


